package com.snline.crm.logistics.action;

import javax.annotation.Resource;

import com.snline.crm.logistics.entity.ProjectUserInfo;
import com.snline.crm.logistics.service.UserService;

public class UserAction extends BaseAction {

	/**
	 * 序列化
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 项目信息
	 */
	private ProjectUserInfo projectUserInfo;
	
	@Resource
	private UserService userService;
	
	/**
	 * 项目信息取得
	 * @return 处理结果
	 */
	public String getProjectUserInfoById() {
		
		String userId = session.get("userId").toString();

		projectUserInfo = userService.findProjectUserInfoById(userId);
		    
		return  SUCCESS;
	}

	
	public String save() {
	    
	    if (projectUserInfo != null) {
	    	userService.updateProjectUserInfo(projectUserInfo);
	    }
	    return SUCCESS;
	}


	/**
	 * @return the projectUserInfo
	 */
	public ProjectUserInfo getProjectUserInfo() {
		return projectUserInfo;
	}


	/**
	 * @param projectUserInfo the projectUserInfo to set
	 */
	public void setProjectUserInfo(ProjectUserInfo projectUserInfo) {
		this.projectUserInfo = projectUserInfo;
	}


	/**
	 * @return the userService
	 */
	public UserService getUserService() {
		return userService;
	}


	/**
	 * @param userService the userService to set
	 */
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	

}
